﻿using DC2010.Objects;
using DC2010.Objects.Base;
using DC2010.Objects.Data;

namespace DC2010.Effects
{
    public class I_Levitate_Effect : EffectLogic
    {
        public I_Levitate_Effect(EffectData ed)
            : base(ed)
        {
            ShortName = "LEVITATE";
            LongName = "Effect makes invoker levitating.";
            Id = "I_LEVITATE_EFFECT";
            EffectType = EffectType.Instant;
        }

        public override void Instant(BaseObject aInvoker, BaseObject aTarget)
        {
            if (aTarget is CreatureData)
            {
                CreatureData c = (CreatureData)aTarget;
                c.Flags.IsLevitating = !c.Flags.IsLevitating;
            }

            base.Instant(aInvoker, aTarget);
        }
    }
}
